package com.example.wangandroid.adapter

import androidx.appcompat.app.AppCompatActivity
import androidx.fragment.app.Fragment
import androidx.viewpager2.adapter.FragmentStateAdapter
import com.example.wangandroid.datas.ProjectData
import com.example.wangandroid.ui.login.ui.fragment.ProjectFragment
import com.example.wangandroid.ui.login.ui.fragment.ProjectFragmentRecyleFragment

class ProjectFagmentStameAdapter(var activity: ProjectFragment, var data:ProjectData):FragmentStateAdapter(activity) {
    override fun getItemCount(): Int {
        return data.data.size
    }

    override fun createFragment(position: Int): Fragment {
        return ProjectFragmentRecyleFragment.newInstance(position,data.data[position].id.toString())
    }
}